
#include "iostream"
#include "vector"
#include "unordered_map"
#include "algorithm"
#include "string"
#include "list"


class BigShishu{
public:
    std::string zs;
    std::string xs;
    void read_one(){
        bool zs_fin=false;
        while (1){
            char a=std::cin.get();
            if(a=='\n'||a==' '||a==EOF){
                break;
            }
            if(a=='.'){
                zs_fin= true;
            }
            if(a>='0'&&a<='9'){
                if(zs_fin){
                    xs+=a;
                }else{
                    zs+=a;
                }
            }
        }
    }
    void print(){
        std::cout<<zs;
        if(xs.size()>0){
            std::cout<<'.';
            std::cout<<xs;
        }
    }
    void set_zs_at(int i,int v){
        while (i>=zs.size()){
            zs='0'+zs;
        }
        zs[zs.size()-i-1]=v+'0';
    }
    int get_zs_at(int i){
        if(i>=zs.size()){
            return 0;
        }
        return zs[zs.size()-i-1]-'0';
    }
    void set_xs_at(int i,int v){
        while(i>=xs.size()){
            xs+='0';
        }
        xs[i]=v+'0';
        if(i==xs.size()-1&&xs[i]=='0'){
            xs.pop_back();
        }
    }
    int get_xs_at(int i){
        if(i>=xs.size()){
            return 0;
        }
        return xs[i]-'0';
    }
};
BigShishu plus(BigShishu&a,BigShishu&b){
    BigShishu t;
    int minlen= std::min(a.xs.size(),b.xs.size());
    if(a.xs.size()>b.xs.size()){
        t.xs=a.xs;
    }else{
        t.xs=b.xs;
    }

    int jinwei=0;
    for(int i=minlen-1;i>=0;i--){
        int n1=a.get_xs_at(i);
        int n2=b.get_xs_at(i);
        t.set_xs_at(i,(n1+n2+jinwei)%10);
        jinwei=(n1+n2+jinwei)/10;
    }
    ;
    int maxlen= std::max(a.zs.size(),b.zs.size());
    for(int i=0;i<maxlen;i++){
        int n1=a.get_zs_at(i);
        int n2=b.get_zs_at(i);
        t.set_zs_at(i,(n1+n2+jinwei)%10);
        jinwei=(n1+n2+jinwei)/10;
    }
    if(jinwei){
        t.set_zs_at(t.zs.size(),jinwei);
    }

    ;
    return t;
}
class Solution{
public:
    void handle_one_line(){
        BigShishu a,b;
        a.read_one();b.read_one();
        auto c= plus(a,b);
        c.print();
        printf("\n");
    }
    void run(){
        int a;
        while(std::cin>>a){
            std::cin.get();
            while (a){
                handle_one_line();
                a--;
            }
        }
    }
};

int main() {
//    bool cur_num= true;
Solution().run();
    return 0;
}

